<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<%@ page contentType="text/html; charset=utf-8" %>
<%@ include file="/commons/taglibs.jsp" %>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	<title>登录日志查询</title>

	<%@ include file="/commons/css_js_head.jsp" %>
	
<script type="text/javascript">
//复写Url
doListUrl = "${ctx }/permission/efUserLoginLogAction!doList.ts";
doAddBeforeUrl = "${ctx }/permission/efUserLoginLogAction!doFindById.ts";
doUpdateBeforeUrl = "${ctx }/permission/efUserLoginLogAction!doFindById.ts";
		
//添加之前
function doAddBefore(){
   var _form = document.forms[0];
   if(doAddBeforeUrl == ''){
   	alert('请设置正确的URL!');
   	return false;
   }

   _form.action = doAddBeforeUrl;
   _form.submit();
}

//更新之前 
function doUpdateBefore(pkId){
   var _form = document.forms[0];
   if(doUpdateBeforeUrl == ''){
   	alert('请设置正确的URL!');
   	return false;
   }

   _form.action = doUpdateBeforeUrl+"?logId="+pkId;
   _form.submit();
}

//删除
function doDel(){
   var _form = document.forms[0];
   if(doDelUrl == ''){
   	alert('请设置正确的URL!');
   	return false;
   }

   _form.action = doDelUrl;
   _form.submit();
}
</script>
	
</head>

<body style="overflow-x:hidden">

<!-- 标题 -->
<div class="mTitle">
  <span class="hidsearch"><a href="javascript:void(0)" onclick="return chg('searchList');" id="ImgArrow">
  	<img src="${ctx}/images/icon_up.gif" id ="imgButton" /></a>
  </span>
  <b class="bbig">登录日志查询</b>
  <!-- <a href="javascript:void(0)" onclick="javascript:doAddBefore();">添加用户登录日志</a>  -->
</div>

<!-- 查询条件 -->
<div class="searchBar" id="searchList" style="display:block;">
<s:form action="/permission/efUserLoginLogAction!doList.ts" id="form1" method="post">
  <table class="searchTable">
	  <tr>
		<th>用户账号：</th>
	    <td>
	    	<s:textfield name="userAccount" theme="simple"></s:textfield>
	    </td>
	    <th>用户姓名：</th>
	    <td>
	    	<s:textfield name="userName" theme="simple"></s:textfield>
	    </td>
		<th>登录时间：</th>
	    <td>
		    <s:textfield name="logonDateTimeStart" cssClass="Wdate" size="12" onfocus="WdatePicker({el:'logonDateTimeStart',dateFmt:'yyyy-MM-dd'})" readonly="true" theme="simple" />
		    <i>至</i>
		    <s:textfield name="logonDateTimeEnd" cssClass="Wdate" size="12" onfocus="WdatePicker({el:'logonDateTimeEnd',dateFmt:'yyyy-MM-dd'})" readonly="true" theme="simple" />
	    </td>
	    <td>
	    	<input name="btn_query" type="button" class="btn" value="查询" onclick="doQuery()" />
	    	<input name="btn_reset" type="button" class="btn" value="清空查询条件" onclick="doReset()" />
	    </td>
	  </tr>
  </table>
</s:form>
</div>

<!-- start 显示内容 -->
<aa:zone name="zoneList">
<div class="mainList">

<table class="listTable">
  <tr>
    <th width="20%">日志ID</th>
    <th width="10%">用户账号</th>
    <th width="10%">用户名称</th>
    <th width="20%">登录时间</th>
    <th width="10%">登录IP</th>
    <th >描述</th>
  </tr>

	<c:forEach var="efUserLoginLog" items="${pager.data}">
		<tr>
		    <td align="center">
		    	${efUserLoginLog.logId}
		    </td>
		    <td align="center">
		    	${efUserLoginLog.efUser.userAccount}
		    </td>
		    <td align="center">
		    	${efUserLoginLog.efUser.userName}
		    </td>
		    <td align="center">
		    	<fmt:formatDate value="${efUserLoginLog.logonDatetime}" pattern="yyyy-MM-dd HH:mm:ss"/>
		    </td>
		    <td align="center">
		    	${efUserLoginLog.logonIp}
		    </td>
		    <td align="center">
		    	${efUserLoginLog.remark}
		    </td>
		    <!-- 
		    <td align="center">
		    	<a href="javascript:void(0)" onclick="javascript:doUpdateBefore('${efUserLoginLog.logId}');"><span class="icon_edit">&nbsp;</span>修改</a>
		    	<span class="icon_del">&nbsp;</span>删除
		    </td>
		     -->
	    </tr>
	</c:forEach>
	
<!-- pager footer end -->
</table>
</div>
</aa:zone>
<!-- end 显示内容 -->

<!-- 分页区域  -->
<%@ include file="/page/pager.jsp"%>


<script type="text/javascript">
ajaxAnywhere.formName = "form1";
ajaxAnywhere.getZonesToReload = function() {
    return "zoneList";
}
</script>


</body>
</html>

